package com.ht.system.api;

import com.ht.common.core.constant.SecurityConstants;
import com.ht.common.core.constant.ServiceNameConstants;
import com.ht.common.core.domain.R;
import com.ht.system.api.dto.CustomsDto;
import com.ht.system.api.factory.RemoteCustomsFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 远程调用获取关区信息
 *
 * @author zmx
 */
@FeignClient(contextId = "remoteCustomsService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteCustomsFallbackFactory.class)
public interface RemoteCustomsService {

    @GetMapping("customs/findByCustomsCode/{customsCode}")
    R<CustomsDto> findByCustomsCode(@PathVariable("customsCode") String customsCode, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
